#include<stdio.h>


void addAndPrintArrays( int a[15], int b[15]);


int main()
{
	


	int array1[15] = {1,5,6,3,7,4,2,8,9,2,6,7,1,5,3};
	int array2[15] = {2,8,2,6,3,8,1,3,4,9,2,4,8,7,6};
	// result = 4 3 9 0 1 2 4 2 4 1 9 2 0 2 9
	printf( "The result of the addition is :\n" );
	addAndPrintArrays( array1, array2 );
	

	return 0;
}

	
void addAndPrintArrays( int a[15], int b[15])
{
		int x=14;
		int i=0;
		int result[15]={0};

		for(x=14; x>=0; x--)
		{
			if((a[x]+b[x])>9)
			{
				result[x]+=a[x]+b[x]-10;
				result[x-1]++;
			}
			else
				result[x]+=a[x]+b[x];
		}
		
		
		for(i=0; i<15; i++)
		{
			printf("%d", result[i]);
		}
		printf("\n");
}





